package com.hd123.rumba.gwt.widget.client.codenamebox;

import com.google.gwt.user.client.rpc.IsSerializable;

public class UuidCodeName implements IsSerializable {
  private String uuid;
  private String code;
  private String name;
  private String extra;

  public UuidCodeName() {

  }

  public UuidCodeName(String uuid, String code, String name) {
    this(uuid, code, name, null);
  }

  public UuidCodeName(String uuid, String code, String name, String extra) {
    setUuid(uuid);
    setCode(code);
    setName(name);
    setExtra(extra);
  }

  public String getCode() {
    return code;
  }

  public void setCode(String code) {
    this.code = code;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String getUuid() {
    return uuid;
  }

  public void setUuid(String uuid) {
    this.uuid = uuid;
  }

  public String getExtra() {
    return extra;
  }

  public void setExtra(String extra) {
    this.extra = extra;
  }

  public String toString() {
    return uuid + "," + code + "," + name + "," + extra;
  }

  public String getCodeName() {
    if (code == null)
      return null;
    return code + "[" + name + "]";
  }
}
